package com.mt.pojo;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mt.VO.FilmScheduleInfoVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * @author Wang
 * @Description  订单详细界面 电影票详情
 * @date 2020/12/29-16:26
 */

@Data
@EqualsAndHashCode(callSuper = false)
@TableName("mt_ticket")
@ApiModel(value="mt_ticket对象", description="")
public class Ticket {
    @ApiModelProperty(value = "自增id")
    @TableId(value="id", type= IdType.AUTO)
    private Integer id;

    private String userId;

    private Integer scheduleId;

    private  String orderId;

    @ApiModelProperty(value = "座位列表")
    @TableField(exist=false)
    List<CinemaSeat> seatList;

    @ApiModelProperty(value = "电影场次信息")
    @TableField(exist=false)
    FilmScheduleInfoVO scheduleInfo;

    @ApiModelProperty(value = "总票价")
    @TableField(exist=false)
    private BigDecimal totalPrice;

    @ApiModelProperty(value = "订单创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" ,timezone="GMT+8")
    @TableField(exist=false)
    private Date createTime;

    @ApiModelProperty(value = "入库时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" ,timezone="GMT+8")
    private Date insertTime;

    @TableField(fill = FieldFill.UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" ,timezone="GMT+8")
    private Date updateTime;
}
